package ink.ykb.demo.permission.enums;


public enum Status {
  
  /**是 ：1*/
  YES("是",1),
  
  /**否：0*/
  NO("否",0);
  
  private String name;
  
  private Integer value;
  
  private Status(String name, Integer value) {
      this.name = name;
      this.value = value;
  }
  
  public static Status getStatus(Integer value) {
    if(value == null){
        return null;
    }
    Status[] values = Status.values();
    for (Status type : values) {
        if(type.getValue().equals(value)){
            return type;
        }
    }
    return null;
  }
  

  public String getName() {
      return name;
  }

  public Integer getValue() {
      return value;
  }

}
